set (B_SOURCES test_pat_B.c)
set (C_SOURCES test_pat_C.c)
set (G_SOURCES test_pat_G.c)
set (I_SOURCES test_pat_I.c)
set (L_SOURCES test_pat_L.c)
set (R_SOURCES test_pat_R.c)

if (MSVC)
  set_source_files_properties (test_pat_B.c test_pat_C.c test_pat_G.c test_pat_I.c test_pat_L.c test_pat_R.c PROPERTIES LANGUAGE CXX)
  set (B_SOURCES ${B_SOURCES} ${FREI0R_DEF})
  set (C_SOURCES ${C_SOURCES} ${FREI0R_DEF})
  set (G_SOURCES ${G_SOURCES} ${FREI0R_DEF})
  set (I_SOURCES ${I_SOURCES} ${FREI0R_DEF})
  set (L_SOURCES ${L_SOURCES} ${FREI0R_DEF})
  set (R_SOURCES ${R_SOURCES} ${FREI0R_DEF})
endif (MSVC)

link_libraries(m)
add_library (test_pat_B MODULE ${B_SOURCES})
add_library (test_pat_C MODULE ${C_SOURCES})
add_library (test_pat_G MODULE ${G_SOURCES})
add_library (test_pat_I MODULE ${I_SOURCES})
add_library (test_pat_L MODULE ${L_SOURCES})
add_library (test_pat_R MODULE ${R_SOURCES})

set_target_properties (test_pat_B PROPERTIES PREFIX "")
set_target_properties (test_pat_C PROPERTIES PREFIX "")
set_target_properties (test_pat_G PROPERTIES PREFIX "")
set_target_properties (test_pat_I PROPERTIES PREFIX "")
set_target_properties (test_pat_L PROPERTIES PREFIX "")
set_target_properties (test_pat_R PROPERTIES PREFIX "")

install (TARGETS test_pat_B LIBRARY DESTINATION ${LIBDIR})
install (TARGETS test_pat_C LIBRARY DESTINATION ${LIBDIR})
install (TARGETS test_pat_G LIBRARY DESTINATION ${LIBDIR})
install (TARGETS test_pat_I LIBRARY DESTINATION ${LIBDIR})
install (TARGETS test_pat_L LIBRARY DESTINATION ${LIBDIR})
install (TARGETS test_pat_R LIBRARY DESTINATION ${LIBDIR})
